import { IVatsimAtis } from "./IVatsimAtis";
import { IVatsimDataGeneralInfo } from "./IVatsimDataGeneralInfo";
import { IVatsimServer } from "./IVatsimServer";
import { IVatsimPrefiles } from "./IVatsimPrefiles";
import { IVatsimLSInfo } from "./IVatsimLSInfo";
import { IVatsimRating } from "./IVatsimRating";
import { IVatsimController } from "./IVatsimController";
import { IVatsimPilot } from "./IVatsimPilot";

export interface IVatsimData {
    atis: Array<IVatsimAtis>;
    general: IVatsimDataGeneralInfo;
    servers: Array<IVatsimServer>;
    prefiles: Array<IVatsimPrefiles>;
    facilities: Array<IVatsimLSInfo>;
    ratings: Array<IVatsimLSInfo>;
    pilot_ratings: Array<IVatsimRating>;
    military_ratings: Array<IVatsimRating>;
    controllers: Array<IVatsimController>;
    pilots: Array<IVatsimPilot>;
}

export function createEmptyVatsimData(): IVatsimData {
    return {
        atis: [],
        general: {
            version: 0,
            reload: 0,
            update: "19700101000000",
            update_timestamp: "1970-01-01T00:00:00.0000000Z",
            connected_clients: 0,
            unique_users: 0
        },
        servers: [],
        prefiles: [],
        facilities: [],
        ratings: [],
        pilot_ratings: [],
        military_ratings: [],
        controllers: [],
        pilots: []
    };
}